import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Home from "@/pages/Home"
import Index from "@/pages/Index"
import Fl from "@/pages/fl"
import User from "@/pages/User"
import News from "@/pages/News"
import Zhuce from "@/pages/Zhuce"
import Login from "@/pages/Login"
import Good from "@/pages/Good"
import Flsp from "@/pages/Flsp"
import Mylogin from '@/components/Mylogin.vue'
import Flxq from '@/pages/Flxq.vue'
import Cart from '@/pages/Cart.vue'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld,
      redirect: "/home"
    },
    {
      path: '/home',
      component: Home,
      redirect: "/home/index",
      children:[
        {
          path:"index",
          component:Index
        },
       {
          path:"fl",
          component:Fl
       },
       {
          path:"user",
          component:User
       },
       {
        path:"cart",
        component:Cart
      }
    
      ]
    },
    {
      path: '/news',
      component: News,
      name:"news1"
    },
    {
      path: '/news/:id',
      component: News,
      name:"news2"
    },
      {
      path: '/zhuce',
      component: Zhuce,
      name:"Zhuce"
    },
    {
      path:'/login',
      component:Login,
      name:"login"
    },
    {
      path:'/mylogin',
      name:'mylogin',
      components:Mylogin
    },
    {
      path:"/good",
      component:Good
    },

    {
      path:"/flsp",
      component:Flsp
    },
    {
      path:"/flxq/:id",
      component:Flxq,
      name:"flxq"
    },

  ]
})
